Repository navigation
fix(minimax-pet): 防止拖拽时桌宠窗口尺寸累加 - #164
Merged
MyPrototypeWhat merged 2 commits intoNov 26, 2026
Merged
Conversation
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
展开任务卡后连续拖动桌宠,问题不只是卡片被拉伸:原生窗口本身也会逐次变大。本 PR 保留任务卡的宽度上限,并在拖拽时同时发送位置和当前缩放对应的窗口尺寸,避免尺寸继续累加。
Refs #163
测试环境与结果
Windows 11 x64(构建 26200),MiniMax Code 3.1.19.232,显示缩放 150%,Node.js 22.16.0。以下窗口尺寸来自真实客户端的窗口桥接,任务卡宽度来自页面测量。
264 CSS px,原生窗口仍从280×436变到280×443、975×1090。284×438,四次自动化指针拖拽后的原生窗口依次为281×436 → 280×437 → 280×436 → 280×437,每次位置实际移动,任务卡始终为264 CSS px。仍有 1 像素波动,未再出现累加。dev/pet-art-validation.test.mjs的 Windows CLI 路径构造,测试直接用URL.pathname产生重复盘符,未修改该用例。源码与安装包的改动文件逐字节一致。npm run check:92/92,零错误,MiniMax Pet 零警告。未验证
未用物理鼠标复测,未验证拖拽跟手度、不同 DPI 或 macOS,也未定位宿主内部为何会在仅更新位置时改变尺寸。#132 处理
screenX引起的坐标回弹;本 PR 不改坐标算法,也未复现历史报告中的客户端卡死。点击「放到桌面」后的出界恢复是另一个问题,不在此 PR 中处理。剩余警告
以下 19 条全部来自未修改的包:
README_HEADING_MISSING(4):mcode-token-usage-board、mcode-usage-monitor各缺少 Tested environment 与 Data & access 标题。README_MIN_VERSION_MISSING(3):cq-viewer、xinyu-daily、anatomy-gallery的测试环境未列出所声明能力要求的最低版本。HOST_CONNECTOR_UNVERIFIED(1):ai-node-canvas的连接器授权由宿主在安装时检查,此扫描无法验证。ACCESS_UNDECLARED(1):ai-office的页面使用麦克风但未声明该权限。ENTRY_STDOUT(10):an-bot-team、h3-image-executor、workflow-console(2 条)、minimax-photo、minimax-video(5 条)的既有实现或构建产物写 stdout。权限与兼容性
不新增权限、依赖或宿主 API。既有
session.read、最低 MiniMax Code 3.1.6,以及任务卡、拖拽、缩放和点击穿透能力不变。Written by gpt-6.2-sol
拖拽更新包含
{ x, y, width, height },宽高取原有窗口布局和当前缩放,不读取宿主返回的异常宽高。主动调整缩放时暂不发送拖拽尺寸,避免按旧比例覆盖新设置。.workbench保留两侧各 8 CSS px 的边距;264 来自原有 280 CSS px 设计宽度减去这两段边距,卡片在较窄容器中仍会收缩。源码和安装包同步为0.9.2,根目录已有目录条目,不重复添加。Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.